import sys, pygame
import time
pygame.init()

size = width, height = 800, 600
speed = [2, 2]
speed1 = [1, 2]
black = 200,211, 19

screen = pygame.display.set_mode(size)

ball1 = pygame.image.load("ball.gif")
ball1 = pygame.transform.scale(ball1, (80, 80))
ball = pygame.image.load("ball.gif")

ballrect = ball.get_rect(center=(200,200))


ballrect1 = ball1.get_rect()



while 1:
	time.sleep(0.01)
	for event in pygame.event.get():
		if event.type == pygame.QUIT: sys.exit()
	ballrect = ballrect.move(speed)
	if ballrect.left < 0 or ballrect.right > width:
		speed[0] = -speed[0]
	if ballrect.top < 0 or ballrect.bottom > height:
		speed[1] = -speed[1]
	
	ballrect1 = ballrect1.move(speed1)
	if ballrect1.left < 0 or ballrect1.right > width:
		speed1[0] = -speed1[0]
	if ballrect1.top < 0 or ballrect1.bottom > height:
		speed1[1] = -speed1[1]

	screen.fill(black)
	screen.blit(ball1, ballrect1)
	screen.blit(ball, ballrect)
	print "Hahahahahahahah"
	pygame.display.flip()
